<template>
  <div class="home-product">
    <HomePanel title="生鲜" subTitle="">
      <template #youbian>
        <div class="sub">
          <router-link to="/">热门</router-link>
          <router-link to="/">蔬菜</router-link>
          <router-link to="/">肉禽蛋</router-link>
          <router-link to="/">水果</router-link>
          <router-link to="/">海鲜</router-link>
          <router-link to="/">零食</router-link>
          <router-link to="/">饮料</router-link>
          <gengduo></gengduo>
        </div>
      </template>
      <div class="box">
        <div class="lianjie">
          <router-link to="/" class="cover">
            <img src="https://yjy-oss-files.oss-cn-zhangjiakou.aliyuncs.com/tuxian/home_goods_cover.jpg" alt="" />
            <strong class="label">
              <span>生鲜管</span>
              <span>生鲜2</span>
            </strong>
          </router-link>
        </div>
        <div class="youbianDa">
          <div v-for="i in 8" :key="i" class="itemGoods">
            <div class="pic">
              <img
                src="https://pic.rmb.bdstatic.com/bjh/events/3407e758fc3cd349e290819a035e48a87126.png@h_1280"
                alt=""
              />
            </div>
            <div class="wenzi">
              <div class="shoptitle">云南甘蔗慢熬红糖馒头 220g/袋5个装</div>
              <div class="erjititle">加热即食</div>
              <div class="price">
                <span class="piczuo">&yen;</span>
                <span class="picyou">9.00</span>
              </div>
            </div>
            <div class="extra">
              <RouterLink to="/">
                <span>找相似</span>
                <span>发现现多宝贝 &gt;</span>
              </RouterLink>
            </div>
          </div>
        </div>
      </div>
    </HomePanel>
  </div>
</template>

<script lang="ts" setup name="home-product">
import HomePanel from './home-panel.vue'

// home-product
</script>

<style lang="less" scoped>
.home-product {
  background-color: #fff;
  height: 100%;
  .box {
    display: flex;
    justify-content: space-between;
    .lianjie {
      width: 240px;
      position: relative;
      a {
        img {
          height: 610px;
        }
      }
      .label {
        width: 188px;
        height: 66px;
        position: absolute;
        top: 50%;
        transform: translate3d(0, -50%, 0);
        left: 0;
        display: flex;
        font-size: 18px;
        line-height: 66px;
        color: #fff;
        span {
          text-align: center;
          &:first-child {
            width: 76px;
            background: rgba(0, 0, 0, 0.556);
          }
          &:last-child {
            flex: 1;
            background: rgba(0, 0, 0, 0.369);
          }
        }
      }
    }
    .youbianDa {
      width: 990px;
      display: flex;
      flex-wrap: wrap;
      .itemGoods {
        width: 240px;
        height: 300px;
        margin-right: 10px;
        margin-bottom: 10px;
        //
        padding: 10px 30px;
        position: relative;
        overflow: hidden;
        border: 2px solid transparent;
        transition: all 0.5s;
        //
        .pic {
          display: block;
          margin: 0 auto;
          width: 160px;
          height: 160px;
          img {
            width: 100%;
            height: 100%;
          }
        }
        .wenzi {
          margin-top: 6px;
          font-size: 16px;
          .shoptitle {
            height: 44px;
          }
          .erjititle {
            color: #666;
            height: 22px;
          }
          .price {
            margin-top: 10px;
            .picyou {
              font-size: 20px;
              color: @priceColor;
            }
          }
        }
        .extra {
          position: absolute;
          left: 0;
          bottom: 0;
          height: 86px;
          background-color: @xtxColor;
          width: 100%;
          text-align: center;
          line-height: 86px;
          transform: translate3d(0, 101%, 0);
          transition: all 0.5s;
          a {
            span {
              display: block;
              color: #fff;
              width: 120px;
              margin: 0 auto;
              line-height: 30px;
              &:first-child {
                font-size: 18px;
                border-bottom: 1px solid #fff;
                line-height: 40px;
                margin-top: 5px;
              }
            }
          }
        }
        &:nth-last-child(-n + 4) {
          margin-bottom: 0;
        }
        &:nth-last-child(4n) {
          margin-right: 0;
        }
        &:hover {
          border-color: @xtxColor;
          .extra {
            transform: none;
          }
        }
      }
    }
  }
}
</style>
